//
//  ScreenUtrl.h
//  Fanke
//
//  Created by sharayuki on 2017/8/12.
//  Copyright © 2017年 sharayuki. All rights reserved.
//

#ifndef ScreenUtrl_h
#define ScreenUtrl_h

//--------------获取屏幕----------------
#define Screen_bounds [UIScreen mainScreen].bounds
#define Screen_width [[UIScreen mainScreen] bounds].size.width
#define Screen_height [[UIScreen mainScreen] bounds].size.height
#define StatusBarHeight ([UIApplication sharedApplication].statusBarHidden ? 0 : [UIApplication sharedApplication].statusBarFrame.size.height)
//--------------获取导航条和tabbar高度----------------
#define NaviBarHeight (self.navigationController == nil ? 0 : (self.navigationController.navigationBarHidden ? 0 : self.navigationController.navigationBar.frame.size.height))

#define TabBarHeight (self.tabBarController == nil ? 0 : (self.tabBarController.hidesBottomBarWhenPushed ? 0 : self.tabBarController.tabBar.frame.size.height))
//--------------判断机型----------------
#define IPHONE4                 ([[UIScreen mainScreen] bounds].size.height == 480.0)
#define IPHONE5                 ([[UIScreen mainScreen] bounds].size.height == 568.0)
#define IPHONE6                 ([[UIScreen mainScreen] bounds].size.height == 667.0)
#define IPHONE6Plus             ([[UIScreen mainScreen] bounds].size.height == 736.0)

#define IOSDEVICE [[[UIDevice currentDevice] systemVersion] floatValue]
//--------------判断系统版本----------------
#define iOS7 ([[UIDevice currentDevice].systemVersion doubleValue] >= 7.0)
//是否为iOS8及以上系统
#define iOS8 ([[UIDevice currentDevice].systemVersion doubleValue] >= 8.0)
//是否为iOS9及以上系统
#define iOS9 ([[UIDevice currentDevice].systemVersion doubleValue] >= 9.0)
//--------------RGBAColor----------------
#define RGB(r,g,b) [UIColor colorWithRed:(r)/255.0 green:(g)/255.0 blue:(b)/255.0 alpha:1]
#define RGBA(r,g,b,a) [UIColor colorWithRed:(r)/255.0 green:(g)/255.0 blue:(b)/255.0 alpha:(a)]

//--------------判断系统版本----------------
#define OS_Version [UIDevice currentDevice].systemVersion

#define Show_OSVERSION [NSString stringWithFormat:@"IOS%@",OS_Version]

#define UUID [[UIDevice currentDevice].identifierForVendor UUIDString]
#endif /* ScreenUtrl_h */
